package pw.hais.etgsh.activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechSynthesizer;

import pw.hais.etgsh.R;
import pw.hais.etgsh.app.BaseActivity;
import pw.hais.utils.DownTime;

public class StartActivity extends BaseActivity {
    private TextView text_msg;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);

        getSupportActionBar().hide();
        text_msg = (TextView) findViewById(R.id.text_msg);

        new DownTime(2 * 1000, 1000) {
            @Override
            public void onTick(long millisUntilFinished) {
                text_msg.setText("(" + ((int) millisUntilFinished / 1000) + "秒后跳转到主页)");
            }

            @Override
            public void onFinish() {
                startActivity(new Intent(context, MainActivity.class));
                finish();
            }
        }.start();
    }
}
